#pragma once
#include <functional>
#include <iostream>
#include <unistd.h>
using namespace std;

using task_t = function<void()>;

void Download()
{
    cout<<"我是一个下载任务"<<endl;
    sleep(3);
}

class Task
{
public:
    Task()
    {
    }
    Task(int x, int y)
        : _x(x), _y(y)
    {
    }
    void Execute()
    {
        _result = _x + _y;
    }
    int X()
    {
        return _x;
    }
    int Y()
    {
        return _y;
    }
    int Result()
    {
        return _result;
    }
    ~Task()
    {
    }

private:
    int _x;
    int _y;
    int _result;
};